package org.nuplay;

import java.awt.event.*;

import javax.swing.*;

public class NuPlayPerformanceTool extends JFrame implements WindowListener, ActionListener {

	
	public NuPlayPerformanceTool() {
		javax.swing.JDesktopPane desktop = new javax.swing.JDesktopPane();
		NuPlayAudioClientInternal client = new NuPlayAudioClientInternal();
		NuPlayWiiMoteClientInternal wiimote = new NuPlayWiiMoteClientInternal();
		
		client.setVisible(true);
		desktop.add(client);
		
		wiimote.setVisible(true);
		desktop.add(wiimote);
		
		
		setContentPane(desktop);
		 setJMenuBar(createMenuBar());
	}
	
    protected JMenuBar createMenuBar() {
        JMenuBar menuBar = new JMenuBar();
        return menuBar;
    }
	
	public void windowActivated(WindowEvent e) {
		// TODO Auto-generated method stub

	}

	public void windowClosed(WindowEvent e) {
		// TODO Auto-generated method stub

	}

	public void windowClosing(WindowEvent e) {
		// TODO Auto-generated method stub
		close();
	}

	public void windowDeactivated(WindowEvent e) {
		// TODO Auto-generated method stub

	}

	public void windowDeiconified(WindowEvent e) {
		// TODO Auto-generated method stub

	}

	public void windowIconified(WindowEvent e) {
		// TODO Auto-generated method stub

	}

	public void windowOpened(WindowEvent e) {
		// TODO Auto-generated method stub

	}
	
	
	public void close() {
		System.exit(0);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		JFrame main_window = new NuPlayPerformanceTool();
		main_window.setSize(1024, 768);
		main_window.setTitle("NuPlay Performance Tool client V1.0");
		main_window.setVisible(true);
	}

	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		
	}

}
